package com.springtiles.util;

import java.util.List;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.springtiles.entity.IUserinfoDAO;
import com.springtiles.entity.Userinfo;

public class MyTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(
				"applicationContext.xml");

		IUserinfoDAO userdao = (IUserinfoDAO) ctx.getBean("UserinfoDAO");
		List<Userinfo> users = userdao.findAll(0, 9);
		for (Userinfo user : users) {
			System.out.println(user.getUsername());
		}
	}
}
